In-place permuting and perfect shuffling using involutions

نویسندگان

  • Qingxuan Yang
  • John A. Ellis
  • Khalegh Mamakani
  • Frank Ruskey
چکیده

Every permutation of {1, 2, . . . , N} can be written as the product of two involutions. As a consequence, any permutation of the elements of an array can be performed in-place using simultaneous swaps in two rounds of swaps. In the case where the permutation is the k-way perfect shuffle we develop two methods for efficiently computing the pair of involutions that accomplishes these swaps. The first method works whenever N is a power of k; in this case the time is O(N) and space O(log N). The second method applies to the general case where N is a multiple of k; here the time is O(N logN) and the space is O(log N). If k = 2 the space usage of the first method can be reduced to O(logN) on a machine that has a SADD (population count) instruction. keywords: Perfect shuffle, merging, sorting, permutation, involution.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parallel and sequential in-place permuting and perfect shuffling using involutions

Every permutation of {1, 2, . . . , N} can be written as the product of two involutions. As a consequence, any permutation of the elements of an array can be performed in-place using simultaneous swaps in two rounds of swaps. In the case where the permutation is the k-way perfect shuffle we develop two methods for efficiently computing the pair of involutions that accomplishes these swaps. The ...

متن کامل

Juggling and Card Shuffling Meet Mathematical Fonts

We explore two of Ron Graham’s passions—juggling patterns and perfect card shuffling— through one of our passions, mathematical fonts. First, for each letter of the English alphabet, we design a one-person three-ball juggling pattern where the balls trace out the letter (possibly rotated 90◦). Second, using a deck of 26 cards labeled A through Z, we show how to perform a sequence of in/out perf...

متن کامل

Generalized Boolean Bent Functions

The notions of perfect nonlinearity and bent functions are closely dependent on the action of the group of translations over IF2 . Extending the idea to more generalized groups of involutions without fixed points gives a larger framework to the previous notions. In this paper we largely develop this concept to define G-perfect nonlinearity and G-bent functions, where G is an Abelian group of in...

متن کامل

Permutation tests for phylogenetic comparative analyses of high-dimensional shape data: what you shuffle matters.

Evaluating statistical trends in high-dimensional phenotypes poses challenges for comparative biologists, because the high-dimensionality of the trait data relative to the number of species can prohibit parametric tests from being computed. Recently, two comparative methods were proposed to circumvent this difficulty. One obtains phylogenetic independent contrasts for all variables, and statist...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 113  شماره 

صفحات  -

تاریخ انتشار 2013